<!doctype html>
<html>
<head>
    <title>搜索店铺宝贝,获取商品列表</title>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link href="<?php echo URLPRE;?>static/admin/css/admin_full.css" rel="stylesheet" />
    <link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/Kalendajs/build/kalendae.standalone.js"></script>
    <link href="<?php echo URLPRE;?>static/public/Lib/Kalendajs/build/kalendae.css" rel="stylesheet" />
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/jquery/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/jquery/jquery.form.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/validate/jquery.validate.1.9.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/validate/jquery.metadata.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/validate/messages_cn.js"></script>
    <link href="<?php echo URLPRE;?>static/public/Lib/artDialog/skins/default.css" rel="stylesheet" />
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/artDialog/jquery.artDialog.source.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/artDialog/plugins/iframeTools.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/admin/js/common.js"></script>
</head>
<body>
<div id="popup"></div>
<div class="wrap J_check_wrap">
    <div class="h_a">功能说明</div>
    <div class="prompt_text">
        搜索店铺宝贝,获取商品列表,复制宝贝到仓库,只有有效的宝贝链接复制记录才可以查到哦
    </div>
    <form action="<?php echo $form_url ;?>" class="formvalidate" method="post">
    <div class="h_a">复制条件</div>
    <div class="search_type cc mb10">
        <div class="mb10">
            <label>运费模板：</label>
            <select name="Form[freight]"> <option value="1">复制运费模板(如有同名自动选择同名模板)</option></select> <a href="">运费模板设置</a>
        </div>
        <div class="mb10">
            <label>过滤宝贝：</label>
            <input type="checkbox" checked name="filter"  placeholder="必填">过滤已经复制的宝贝
        </div>
        <div class="mb10">
            <label>宝贝价格设置：</label>
            <select name="Form[price]">
                <option value="1">原价</option>
                <option value="2">促销价</option>
            </select>
            <label>乘(*)</label>
            <input type="text" class="input" name="Form[multiply]" validate="{number:true}" placeholder="填写数字">
            <label>加(+)</label>
            <input type="text" class="input" name="Form[plus]" validate="{number:true}"  placeholder="填写数字">
            <label>减(-)</label>
            <input type="text" class="input" name="Form[minus]" validate="{number:true}"  placeholder="填写数字">
            <label>(只允许填一项)</label>
        </div>
        <div class="mb10">
            <label>宝贝标题扩展：</label>
            <input type="text" class="input length_3" name="Form[prefix]"  placeholder="标题前缀">
            <label>+原标题+</label>
            <input type="text" class="input length_3" name="Form[suffix]"  placeholder="标题后缀">
        </div>
        <div class="mb10">
            <label>宝贝标题过滤：</label>
            <input type="text" class="input length_3" name="Form[target]"  placeholder="要替换的文字">
            <label>+替换为+</label>
            <input type="text" class="input length_3" name="Form[replace]"  placeholder="替换后的文字">
        </div>
    </div>
    <div class="h_a">复制宝贝到仓库</div>
    <div class="search_type cc mb10">

            <div class="ul_wrap">
                <label>宝贝链接或ID：</label>
                <textarea name="Form[ids]" validate="{required:true}" type="text" placeholder="宝贝链接或ID,多个宝贝用Enter回车键隔开" ><?php echo @$num_iid;?></textarea>
                <div class="prompt_text"></div>
                <div class="mb10">
                    <button class="btn btn_submit J_ajax_submit_btn" type="submit" >复制宝贝到仓库</button>
                </div>
        </div>

    </div>

    </form>

    <?php if(empty($list)){ ?>
        <div class="not_content_mini"><i></i>还没有宝贝！</div>
    <?php }else{?>
        <div class="table_list" id="DataBox">
            <table width="100%">
                <thead>
                <tr>
                    <th style="width:1%;"><li><a data="true" title="全选" onclick="tools_select('id[]',this)" href="javascript:;" class="icon-checkbox-checked icon-checkbox-unchecked"> 全选 </a></li></th>
                    <td>商品ID</td>
                    <td>名称</td>
                    <td>描述</td>
                    <td>主图</td>
                    <td>附图</td>
                    <td>价格</td>
                    <td>卖家</td>
                    <td>所在地</td>
                    <td>操作</td>
                </tr>
                </thead>
                <?php foreach ($list as $k => $v):?>
                    <tr>
                        <td style="width:2%">
                            <input type="checkbox" value="<?php echo $v['num_iid'];?>" name="id[]">

                        </td>
                        <td><?php echo $v['num_iid'];?></td>
                        <td><?php echo $v['title'];?></td>
                        <td><?php echo $v['desc'];?></td>
                        <td><img width="200" height="100" src="<?php echo $v['pic_url'];?>" ></td>
                        <td></td>
                        <td><?php echo $v['price'];?></td>
                        <td><?php echo $v['nick'];?></td>
                        <td><?php echo $v['location']['city'];?>-<?php echo $v['location']['state'];?></td>

                        <td class="btn_min">
                            <div class="operat hidden">
                                <a class="icon-cog action" href="javascript:;">处理</a>
                                <div class="menu_select">
                                    <ul>
                                        <li><a class="icon-pencil" href="<?php echo $v['detail_url'];?>" target="_blank">预览</a></li>
                                        <li><a class="icon-drawer-3 operation" href="javascript:;" data-uri="<?php echo site_url('item/copy_item_action?num_iid='.$v['num_iid']);?>" title="快速复制">快速复制</a></li>
                                        <li><a class="icon-drawer-3 operation" href="javascript:;" data-uri="<?php echo site_url('item/copy_item');?>" title="详细复制">详细复制</a></li>
                                    </ul>
                                </div>
                            </div>
                        </td>

                    </tr>
                <?php endforeach ;?>
            </table>
        </div>

    <?php }?>
</div>

</body>
</html>